#include "HtmlOutputer.h"

namespace pktoon
{
	HtmlOutputer::HtmlOutputer(void)
	{
	}
	
	HtmlOutputer::~HtmlOutputer(void)
	{
	}

	void HtmlOutputer::AddBreak( std::string& addString )
	{
		addString +="<br>";
	}

	void HtmlOutputer::AddPriotryString( PriorityLevel::Enum priorityLevel, std::string& level )
	{
		level += "<font style=\"BACKGROUND-COLOR:";
		switch (priorityLevel)
		{
		case PriorityLevel::Error: level	+= "#FF0000"; break; //red;
		case PriorityLevel::Notice: level	+= "#C0C0C0"; break;	//Light Grey
		case PriorityLevel::Info: level		+= "#800080"; break;	//Dark Purple
		case PriorityLevel::Debug: level	+= "#0000FF"; break;	//Light Blue	
		case PriorityLevel::Function: level	+= "#408080"; break;		//Grass Green
		}
		level +="\">";

		switch(priorityLevel)
		{
		case PriorityLevel::Error: level	+= "ERROR&nbsp;"; break;
		case PriorityLevel::Notice: level	+= "NOTICE"; break;
		case PriorityLevel::Info: level		+= "INFO&nbsp;&nbsp;"; break;
		case PriorityLevel::Debug: level	+= "DEBUG&nbsp;"; break;
		case PriorityLevel::Function: level	+= "FUNC&nbsp;&nbsp;"; break;
		}

		level +="</font>";
	}

	void HtmlOutputer::AddEndLine( std::string& addString )
	{
		addString += "<br>";
	}

	void HtmlOutputer::AddFunctionName( const std::string& functionName, std::string& addString )
	{
		addString += functionName;
	}
};
